import request from '@/utils/request'

// 查询机构列表
export function findOrgList(id, name, pageIndex, pageSize) {
  return request({
    url: '/authority/auOrg/queryList',
    method: 'get',
    params: { id, name, pageIndex, pageSize }
  })
}

// 查询机构详情
export function findOrgDetail(id) {
  return request({
    url: '/authority/auOrg/detail',
    method: 'get',
    params: { id }
  })
}

// 删除机构
export function deleteOrg(id) {
  return request({
    url: '/authority/auOrg/delete',
    method: 'delete',
    params: { id }
  })
}

// 添加机构
export function createOrgAdd(data) {
  return request({
    url: '/authority/auOrg/add',
    method: 'post',
    data
  })
}

// 修改机构
export function updateOrg(data) {
  return request({
    url: '/authority/auOrg/update',
    method: 'put',
    data
  })
}
